From 880103c5c3e9e0baee8558e3d7d3afa975452924 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=3D=3FUTF-8=3Fq=3FFabi=3DC3=3DA1n=3D20Ezequiel=3D20Gallina?= =?utf8?q?=3F=3D?= Date: Thu, 17 May 2012 00:03:22 -0300 Subject: [PATCH] Fixed cornercase for normal lines when indentation was triggered in the middle of them --- lisp/progmodes/python.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index cdf8419f288..03524812a2d 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -572,7 +572,7 @@ START is the buffer position where the sexp starts." (let ((block-regexp (python-rx block-start)) (block-start-line-end ":[[:space:]]*$")) (back-to-indentation) - (while (and (forward-comment -9999) (not (bobp)))) + (forward-comment -9999) (back-to-indentation) (when (or (python-info-continuation-line-p) (and (not (looking-at block-regexp)) @@ -595,7 +595,8 @@ START is the buffer position where the sexp starts." 'after-beginning-of-block) ;; After normal line ((setq start (save-excursion - (while (and (forward-comment -9999) (not (bobp)))) + (back-to-indentation) + (forward-comment -9999) (python-nav-sentence-start) (point-marker))) 'after-line) -- 2.30.2